package upm.pb4agent.team3;

import jade.core.Agent;
import jade.wrapper.AgentContainer;
import jade.wrapper.AgentController;

/**
 * This agent has the following functionality: 
 * <ul>
 * <li> 
 * <li> 
 * </ul>
 * @author Team3, UPM
 */
public class AgTeam3 extends Agent {

	private static final long serialVersionUID = 3570392251197898901L;	
	//private Codec codec = new SLCodec();
    //private Ontology ontology = PB4AgentOntology.getInstance();
	
    
	protected void setup(){

		//getContentManager().registerLanguage(codec);
		//getContentManager().registerOntology(ontology);
		
		System.out.println(getLocalName() + ": enters the system");
				
		createAgentsTeam3();		
		
	}
	
	public boolean createAgentsTeam3() {
		try{
			AgentContainer agentContainer = getContainerController();
			
			AgentController agentController = agentContainer.createNewAgent(  Constant.NAME_MANAGER
																			, Constant.CLASS_MANAGER
																			, null);
			
			/*agentController = agentContainer.createNewAgent(   Constant.NAME_LAB_DECOROSO_BOAT
															 , Constant.CLASS_LAB_DECOROSO_BOAT
															 //, Constant.CLASS_LAB_DECOROSO_BOAT_TEST
															 , new String[] { String.valueOf( Constant.TEAM_NUMBER) });*/

			agentController.start();				

			return true;
		}catch(Exception e){
			System.out.println(Constant.NAME_AG_TEAM_X + ".createAgentsTeam3() -::- error: " + e.toString());
			return false;
		}
	}	
}